const blogHandle = (req, res) => {
  const method = req.method
  const url = req.url
  const path = url.split('?')[0]

  res.setHeader('Content-Type', 'application/json')
  if (method === 'GET' && path === '/api/blog/list') {
    // 处理获取博客列表的逻辑
    res.end(JSON.stringify({ msg: '获取博客列表接口' }))
    return true
  }
  if (method === 'GET' && path === '/api/blog/detail') {
    res.end(JSON.stringify({ msg: '获取博客列表接口详情' }))
    return true
  }
  return false
}

module.exports = blogHandle
